package com.server.commons.huawei_obs;

import cn.hutool.core.util.StrUtil;
import com.server.model.all.enums.BucketNameEnum;
import com.server.commons.huawei_obs.base.BaseHuaweiOBSFile;
import com.server.commons.huawei_obs.constant.HuaweiOBSPolicyConstant;
import com.server.commons.huawei_obs.enums.HuaweiOBSLocationEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 缩略图
 * @author LXC
 * @date 2022/5/7 19:12
 */
@Component
@Slf4j
public class ThumbnailHuaweiOBSFile extends BaseHuaweiOBSFile {

    //设置桶
    @Override
    public BucketNameEnum getBucketNameEnum() {
        return BucketNameEnum.THUMBNAIL_IMAGE;
    }

    @Override
    public String getPolicy() {
        return StrUtil.format(HuaweiOBSPolicyConstant.PUBLIC_READ, getBucketNameEnum());
    }

    @Override
    public HuaweiOBSLocationEnum getHuaweiOBSLocationEnum() {
        return HuaweiOBSLocationEnum.CN_NORTH4;
    }
}
